]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: fix clicking on links again
authorDan Winship <danw@gnome.org>
Wed, 23 Mar 2011 20:05:38 +0000 (16:05 -0400)
committerDan Winship <danw@gnome.org>
Fri, 25 Mar 2011 22:49:27 +0000 (18:49 -0400)
The change to make Notification an StButton (06d2c0af, bug 642978)
broke links, because the link actor would ignore the
button-press-event, allowing the notification actor to receive it and
get a pointer grab, and so the link actor would never see the
button-release-event. Fix that by accepting and discarding the
button-press-event.

https://bugzilla.gnome.org/show_bug.cgi?id=645613

js/ui/messageTray.js

index f951801673601cdef829f7076e0ac632a5487e2b..f592f4849b7793e0a117240c8435d6495a09401e 100644 (file)
@@ -108,6 +108,12 @@ URLHighlighter.prototype = {
         }
 
         this.setMarkup(text, allowMarkup);
+        this.actor.connect('button-press-event', function() {
+            // Keep Notification.actor from seeing this and taking
+            // a pointer grab, which would block our button-release-event
+            // handler
+            return true;
+        });
         this.actor.connect('button-release-event', Lang.bind(this, function (actor, event) {
             let urlId = this._findUrlAtPos(event);
             if (urlId != -1) {